<%--
  Created by IntelliJ IDEA.
  User: ME08I
  Date: 2022/1/24
  Time: 17:12
  To change this template use File | Settings | File Templates.
--%>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort() + path + "/";
%>
<%@ page contentType="text/html;charset=UTF-8" language="java" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<!doctype html>
<html lang="en">
<head>
    <base href="<%=basePath
    %>">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <link rel="shortcut icon" href="${pageContext.request.contextPath}/img/favicon.ico" type="image/x-icon">
    <title>信息技术志愿服务队报修管理系统</title>
    <c:import url="../styles/styles.jsp"/>
</head>

<body>
<c:import url="../navbar/navbar.jsp"/>
<c:import url="../navbar/sidenavbar.jsp"/>
<h2 class="sub-header">已完成</h2>
<div class="table-responsive">
    <table class="table table-striped">
        <thead>
        <tr>
<%--            <th>编号</th>--%>
            <th>报修人姓名</th>
            <th>联系方式</th>
            <th>地址</th>
            <th>问题描述</th>
            <th>报修时间</th>
            <th>出勤人员</th>
            <th>派单人员</th>
        </tr>
        </thead>
        <tbody>
        <c:forEach items="${pageBean.list}" var="completed">
        <tr>
<%--            <td>${completed.id}</td>--%>
            <td>${completed.username}</td>
            <td>${completed.contact}</td>
            <td>${completed.address}</td>
            <td>${completed.question}</td>
            <td>${completed.date}</td>
            <td>${completed.accender_name}</td>
            <td>${completed.sender}</td>
            </c:forEach>
        </tr>
        </tbody>
    </table>
    <div style="float: left">
        <p style="color: rgb(51,122,183)">当前在第:${pageBean.getPageNo()}页,共${pageBean.getTotalPages()}</p>
    </div>
    <tr>
        <nav aria-label="Page navigation">
            <ul style="float: right;margin: 0" class="pagination right">
                <li>
                    <a href="completed/listCompleted?pageNo=${pageBean.getTopPageNo()}" aria-label="Previous">首页</a>
                </li>

                <li>
                    <a href="completed/listCompleted?pageNo=${pageBean.getPreviousPageNo()}" aria-label="Previous">
                        上一页
                    </a>
                </li>
                <%--                <c:forEach begin="${pageBean.getTopPageNo()}" end="${pageBean.getBottomPageNo()}" var="page">--%>
                <%--                    <li><a href="completed/listCompleted?pageNo=${page}">${page}</a></li>--%>
                <%--                </c:forEach>--%>

                <li>
                    <a href="completed/listCompleted?pageNo=${pageBean.getNextPageNo()}" aria-label="Next">
                        下一页
                    </a>
                </li>
                <li>
                    <a href="completed/listCompleted?pageNo=${pageBean.getBottomPageNo()}" aria-label="Next">
                        尾页
                    </a>
                </li>
            </ul>
        </nav>
    </tr>
</div>

<c:import url="../styles/script.jsp"/>
</body>
</html>
